package xsl;

import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;

import net.sf.saxon.TransformerFactoryImpl;

public class PhotoAlbumHtmlGenerator {
	public static final String XML_IN = "D:/java-projects/s2-sample/src/main/resources/mariusz-gl/in.xml";
	public static final String XSL = "D:/java-projects/s2-sample/src/main/resources/mariusz-gl/to-html.xsl";

	public static void main(String[] args) throws Exception {
		System.out.println(System.getProperty("user.home"));
		System.out.println(System.getProperty("user.dir"));
		TransformerFactory factory = TransformerFactoryImpl.newInstance();
		Transformer transformer = factory.newTransformer(new StreamSource(XSL));
		transformer.setParameter("outputDirectory", "file:///D:/temp/out/");
		transformer.transform(new StreamSource(XML_IN), new StreamResult());
	}
}
